<?php
/**
 * Created by PhpStorm.
 * User: LiuJiaJun
 * Date: 2018/12/15
 * Time: 15:08
 */

namespace service\k3\order;


class ChangeOrder extends AbstractOrder
{
    function setType()
    {
        $this->type = 'CHG';
    }

    function setTable()
    {
        $this->table = 'v_DBMove_PRT';
    }

    function setFiled()
    {
        $this->field = 'fbillno as order_id,fentryid,fauxqty as count,fitemcode as sub_materiel_id';
    }

    function setParseSql()
    {
        $suffix = sprintf('select %s from %s', $this->field, $this->table);
        $this->parseSql = $suffix . " where fbillno = '%s' and fauxqty > 0";
    }

}